<?php

namespace App\Http\Controllers\Home;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Home\Index;

use App\Models\Admin\Product;



class HomeController extends Controller
{
    //展示前台首页信息
    public function index(){
        $pic = Product::orderBy('id','desc')->limit('5')->get();
    	$data = Index::orderBy('time','desc')->where('post','1')->limit('5')->get();
    	
      
        $this->main['data'] = $data;
        $this->main['pic'] = $pic;

    	return view('home.index.index',$this->main);
    	
    }
}
